'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async get_house() {
    const type = this.ctx.query.type;
    const sql = `select * from home  WHERE TYPE='${type}'`
    const res = await this.app.mysql.query(sql)
    this.ctx.body = { res, code: "200" };
  };
  async high_score() {
    this.ctx.body = "";
  }
  async wonderfulPlace() {
    const type = this.ctx.query.type;
    const sql = `select * from jingcai  WHERE TYPE='${type}'`
    const res = await this.app.mysql.query(sql)
    this.ctx.body = { res, code: "200" };
  }
  async goodHouse() {
    this.ctx.body = "";
  }
  async hieghtHouse() {
    this.ctx.body = "";
  }
  async hotHouse() {
    this.ctx.body = "";
  }
}

module.exports = HomeController;
